package com.demo.repository.config;

/**
 * @author Administrator
 */
public class DynamicDataSourceHolder {


    private static ThreadLocal<String> tl = new ThreadLocal<>();

    public static void setDB(String db) {
        tl.set(db);
    }

    public static String getDB() {
        return tl.get();
    }

    public static void clear() {
        tl.remove();
    }
}
